package com.jn.algorithm.拼多多.q2020.question3;

import java.util.Deque;
import java.util.LinkedList;
import java.util.Scanner;

/**
 * @author 江南大学1033190417
 * @date 2022/5/20 0:51
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String s = scanner.nextLine();
        Long num=Long.parseLong(s);
        System.out.println(num);
        int N = 45, M = 21;
        long K=684637035071725L;
        Node head = new Node();
        head.cur = 'a';
        head.numA = 1;
        Deque<Node> stack = new LinkedList<>();
        stack.addLast(head);
        long count = 0L;
        while (!stack.isEmpty()) {
            Node node = stack.pollLast();
            count++;
            if (count==K){
                node.print();
                return;
            }
            if (node.numB < M) {
                Node l = new Node();
                l.cur = 'b';
                l.numA=node.numA;
                l.numB= node.numB+1;
                l.parent = node;
                stack.addLast(l);
            }
            if (node.numA < N) {
                Node l = new Node();
                l.cur = 'a';
                l.numA= node.numA+1;
                l.numB=node.numB;
                l.parent = node;
                stack.addLast(l);
            }

        }

        head=new Node();
        head.cur='b';
        head.numB=1;
        stack.addLast(head);
        while (!stack.isEmpty()) {
            Node node = stack.pollLast();
            count++;
            if (count==K){
                node.print();
                return;
            }
            if (node.numB < M) {
                Node l = new Node();
                l.cur = 'b';
                l.numA=node.numA;
                l.numB= node.numB+1;
                l.parent = node;
                stack.addLast(l);
            }
            if (node.numA < N) {
                Node l = new Node();
                l.cur = 'a';
                l.numA= node.numA+1;
                l.numB=node.numB;
                l.parent = node;
                stack.addLast(l);
            }

        }

    }


}

class Node {
    public char cur;

    public int numA = 0;

    public int numB = 0;

    public Node parent;


    public void print() {
        Node n = this;
        StringBuilder res = new StringBuilder();
        while (n != null) {
            res.append(n.cur);
            n = n.parent;
        }
        System.out.println(res.reverse());
    }
}
